console.log("嘉嘉豪")

const fs = require("fs");
fs.readFile("C:\\install", "utf-8", (err, data) => {
    if (err) {
        // console.log(err)
        return
    }
    // console.log(data)
})

// let data = fs.readFileSync("D:\\JavaScript/sk/demo3.html","utf-8")
// console.log(data)

const path = require("path")
console.log(path.sep)
let data = fs.readFileSync("C:" + path.sep + "install.log", "utf-8")
let p = path.join("C:", "install.log")
console.log(p)
let p1 = path.join("src", "aa.js")
console.log(p1)
let p2 = path.resolve("/aaa", "install.log")
console.log(p2)

console.log(path.basename(p2))
console.log(path.basename(p2, ".log"))
console.log("dirname:" + path.basename(p2))
console.log(path.extname(p2))

let res1 = path.parse("D:\\JavaScript\\aaa\\install.log")
console.log(res1)
console.log(__dirname)
console.log(__filename)